package my.edu.model.information.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Null;
import lombok.Data;
import my.edu.common.validate.groups.Insert;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("supplier")
public class Supplier {
    @TableId(type = IdType.AUTO)
    @Null(message = "id必须为空",groups = Insert.class)
    private Long id;
    private Long supplierCategoryId;
    private String supplierNo;
    private String supplierName;
    private Long salespersonId;//业务员id
    private String contactPerson;//联系人
    private BigDecimal vatRate;//增值税税率
    private String bankAccount;
    private String bankName;
    private String taxIdentificationNumber;//纳税人识别号
    private String phone;
    private String qqWechat;
    private String contactAddress;//联系地址
    private String remark;
    private BigDecimal payableBalance;//应付余额
    private Integer status;//状态
    private Integer isLogisticsCompany;//是否物流公司
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    @TableField(fill = FieldFill.UPDATE)
    private Long updatedBy;
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT)
    private Long createdBy;
    @Version
    private Integer version;
}